/*
 * This project is mainly focused on developing more and more utilisties
 *  like mail utilities, dao utilities, ldap utilities, file utilities, 
 *  file importing utilities etc. for easy coding in java.
 *  
 *  Copyright (C) 2012  R.Satheesh Kumar alias GURU
 *  
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.jsmart.util.io.file;

import java.io.File;
import java.util.List;
import org.jsmart.util.core.AbstractQueryCaller;
import org.jsmart.util.core.UtilsException;
import org.jsmart.util.io.ReaderUtils;
import org.jsmart.util.core.AbstractItemCallback;
import org.jsmart.util.core.AbstractItemFilter;

/**
 * This class is used to 
 * @author R.Satheesh Kumar alias GURU <pulsarcoder@gmail.com>
 */
public class QueryCSVCaller<T> extends AbstractQueryCaller<File, List<T>, T, String> {
    public QueryCSVCaller(AbstractItemCallback<T, String> callback,
            AbstractItemFilter<String> filter) {
        this(callback, filter, false);
    }

    public QueryCSVCaller(AbstractItemCallback<T, String> callback,
            AbstractItemFilter<String> filter, Boolean singleData) {
        super(callback, filter, singleData);
    }
    
    @Override
    public List<T> doInCallback(File s) throws UtilsException {
        return ReaderUtils.query(s, callback, filter, singleData);
    }
}
